<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div style="display: flex">
        <img th:src="'/productImg/'+${product.imgPath}" width="200" height="200">
        <div>
            <span th:text="${product.name}"></span><br>
            单价：<span th:text="${product.price}"></span><br>
            评论数量：<span th:text="${product.speakNum}"></span>
        </div>
    </div>
    <table border="1" width="60%">
        <thead>
            <tr><th>评论人</th><th>评论内容</th></tr>
        </thead>

        <tbody>
            <tr th:each="p : ${product.speakList}">
                <td th:text="${p.user.uniname}"></td>
                <td th:text="${p.content}"></td>
            </tr>
        </tbody>
    </table>

    <form action="/speak/add">
        <input type="hidden" name="productId" th:value="${product.id}">
        请输入评价：<input type="text" name="content"><br>
        <input type="submit" value="添加">
    </form>

</body>
</html>